package com.ytc.mapper;

import com.ytc.model.Comment;
import org.apache.ibatis.annotations.Param;

/**
* @author 25645
* @description 针对表【my_comment(全部书籍列表)】的数据库操作Mapper
* @createDate 2023-01-08 11:50:03
* @Entity com.ytc.model.Comment
*/
public interface CommentMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Comment record);

    int insertSelective(Comment record);

    Comment selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Comment record);

    int updateByPrimaryKey(Comment record);

    //张阔：查询书籍平均分
    Double queryAvgScore(@Param("blId") Integer blId);

    //张阔：新增书评
    void addComment(Comment comment);

    //张阔：查询书评
    Comment queryCommentByBidAndUid(@Param("bid") Integer bid,@Param("uid") Integer uid);

}
